package com.recsmile.sgs.core;


import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * Created by hanyuanliang on 16/8/24.
 */
public class Player {



    protected int id;

    private String nickname;

    private String openid;

    private int location;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public int getLocation() {
        return location;
    }

    public void setLocation(int location) {
        this.location = location;
    }

    public Player(int id, String nickname, String openid) {
        this.id = id;
        this.nickname = nickname;
        this.openid = openid;
    }

    public Player() {
    }


    public static enum Role
    {
        EMPEROR, LOYALIST, REBEL, USURPER
    }
    protected Role role;


    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("nickname", nickname)
                .append("openid", openid)
                .toString();
    }
}
